import http from "@/utils/http";
import { bodyToQuery } from "@/utils/helper";
import type { LoginFormType } from "./params";
import type { LoginResponseData } from "./res";
import { headerCommon, headerMaster } from "../header";

// 标准写法
enum API {
  POST_LOGIN_API = "/1.1/login",
}

// example
export const postLoginApi = (data: LoginFormType) =>
  http.post<any, LoginResponseData>(API.POST_LOGIN_API, data, {
    headers: headerCommon,
  });
